FROM openjdk:17
VOLUME /tmp

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone

CMD [mkdir  -p /business-demo/]

# 将jar包复制到容器的根目录
COPY business-demo/target/bussiness-demo-1.0.0-SNAPSHOT.jar /business-demo/

# 设置工作目录
WORKDIR /business-demo/

EXPOSE 9999

# 挂载日志目录并指定启动命令
ENTRYPOINT ["nohup","java","-Djava.security.egd=file:/dev/./urandom","-jar","-Xmx1024m","-Xms1024m","/business-demo/bussiness-demo-1.0.0-SNAPSHOT.jar", ">/home/log/nohup.out" , "&"]
